#ifndef _RENZO_ITERATOR_WRAPPERS_
#define _RENZO_ITERATOR_WRAPPERS_

/** Iterator of a map. This class follows the iterator pattern. The implementation is derived from OgreIteratorWrappers.h.
@param T the map that needs iteration.
*/
template <class T>
class MapIterator
{
private:
			typename T::iterator		current;
			typename T::iterator		end;
	typedef typename T::key_type		KeyType;
	typedef typename T::mapped_type		MappedType;
public:
	MapIterator(T& map) 
		: current(map.begin()), end(map.end())
	{
	}

	bool hasNext() const {
		return current != end;
	}

	MappedType next() {
		return (current++)->second;
	}

	MapIterator<T>& operator=(MapIterator<T>& rhs) {
		current = rhs.current;
		end = rhs.end;
		return *this;
	}


};

#endif